<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: xrtqh
  Date: 2023/10/13
  Time: 8:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<script type="text/javascript" src="/static/js/jquery/jquery-3.7.1.min.js" ></script>
<html>
<head>
    <title>Title</title>
</head>
<body>
<c:if test="${user == null}">
    <div class="top-bar">
        <div class="w1230 top-bar-main">
            <ul>
                <li><a href="/user/view/login" class="login">登录</a></li>
                <li><a href="/user/view/register" class="register">注册</a></li>
            </ul>
        </div>
    </div>
</c:if>
<c:if test="${user != null}">
<div class="top-bar">
    <div class="w1230 top-main">
        <a href="index.html" class="toIndex">
            <i class="fa fa-home"></i>
            <span>爱购网首页</span>
        </a>
        <div class="account">
            <span>${user.name}<i class="fa fa-caret-down"></i></span>
            <div class="manage">
                <ul>
                    <li><a href="/user/deliverAddress/deliverAddress">收货地址</a></li>
                    <li><a href="/user/index/shoppingCart">购物车</a></li>
                    <li><a href="/user/view/index/buyerTrade">我的订单</a></li>
                    <li><a href="/user/outLogin">退出</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
</c:if>
</body>
</html>
